package com.team.book.service;


import java.util.List;

import com.team.book.common.domain.Page;
import com.team.book.common.exception.UncheckedException;
import com.team.book.domain.Book;
import com.team.book.domain.BookClassification;
import com.team.book.web.dto.BookDTO;
import com.team.book.web.dto.BookStatisticsDTO;

public interface BookService {
	Page<BookDTO> query(Page<BookDTO> page, BookDTO book);

	Book get(Long code) throws UncheckedException;
	int save(Book book);
	int update(Book book) throws UncheckedException;
	int del(Long code) throws UncheckedException;
	int borrow(Long code) throws UncheckedException;
	int returnBook(Long code) throws UncheckedException;
	int saveClassification(BookClassification classification);

	int updateClassification(BookClassification classification) throws UncheckedException;

	int delClassification(BookClassification classification) throws UncheckedException;

	List<BookClassification> queryClassification();

	Page<BookStatisticsDTO> queryClassificationStatistics(Page<BookStatisticsDTO> page);

	Page<BookStatisticsDTO> queryBorrowStatistics(Page<BookStatisticsDTO> page);
}
